package com.candy.bean;

public class Test01 {
    public static void main(String[] args) {
//        创建对象
        Student stu01=new Student();
//        方法的调用
//        stu01.study();
//        属性的调用
        stu01.stuName="小明";
        System.out.println(stu01.stuName);
        System.out.println("stu01"+stu01);
//        调用全参构造函数，对属性进行赋值
        Student stu02=new Student(1001,"小红",false);
        System.out.println(stu02.stuName);
//        stu02.study();
        System.out.println();
//       调用有返回值的方法，可以用变量进行接收
        String sayhi= stu02.sayHi();
        System.out.println("sayHi方法的最终结果"+sayhi);
        System.out.println(stu01.sayHi("小明"));
        System.out.println(stu02.sayHi("小红"));
    }
}
